Skip to content

Restrict privileged database RPCs and public plan reads - #88

Merged
criptogus merged 1 commit into
codex/jev-agent-match-usd10from
fix/lovable-security-20261123
Nov 23, 2026
Merged

criptogus merged 1 commit into
codex/jev-agent-match-usd10from
fix/lovable-security-20261123

Conversation

@criptogus

Copy link
Copy Markdown
Owner

Summary

- Anonymous/authenticated execution of internal CRM, OAuth, queue and idempotency functions
+ Service-role-only execution for 24 internal RPCs
- Unpinned email search paths and owner-privileged read helpers
+ Empty email search paths and RLS invoker reads
- Unconditional plans reads
+ Explicit public catalogue plus own assigned plans and admin listing

Preserves authenticated transaction guards for purchases, referrals and teams. Restricts review/pack projections to approved public content. Adds a read-only RPC security gate to CI, rollback-only role probes and a reusable review skill. Targets the actual Lovable production branch; no database plan/size or pricing changes.

Evidence

  • Before: live catalogue probes failed CRM client denial, pinned email path and conditional plan access.
  • After: migration dry-run with rollback passed anonymous, ordinary-user and service-role probes, including a synthetic internal plan. Applied migration 20261123193000 passed the same role probes and all five security boundary verdicts.
  • 457 tests, TypeScript and SDK checks, dependency audit and CLI verification passed. Full local validation receipt and PR CI are required before merge.

Merge Danger

Door: Two-way. Permission/policy and function definitions can be reverted; migration contains no destructive data operations. Reverting ACLs would reintroduce exposure.

Blast Radius: Database. Internal RPC access changes; caller tracing preserves existing service clients and authenticated transactional functions. Migration is applied and recorded in Supabase; app deploy follows green checks.

@criptogus
criptogus merged commit e90e90c into codex/jev-agent-match-usd10 Nov 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant